﻿using System;
using System.Collections.Generic;
using Communergy.Common;
using Communergy.Repository.InMemory.Entities;

namespace Communergy.Repository.InMemory
{
    public class InMemoryEnergyDataRepository// : IEnergyDataRepository
    {
        InMemoryUnitOfWork unitOfWork;

        public InMemoryEnergyDataRepository(IUnitOfWork unitOfWork)
        {
            this.unitOfWork = unitOfWork as InMemoryUnitOfWork;
        }

        #region IEnergyDataRepository Members

        public void SaveEnergyData(string sourceId, List<EnergyData> energyData)
        {
            unitOfWork.AddEnergyData(sourceId, energyData);
        }

        public List<EnergyData> GetRawEnergyData(string sourceId, DateTime from, DateTime to)
        {
            var energyData = unitOfWork.GetRawEnergyData(sourceId, from, to);
            return energyData;
        }

        public List<EnergyData> GetEnergyDataInMinutesIntervals(string sourceId, DateTime from, DateTime to, int minutesInterval)
        {
            throw new NotImplementedException();
        }

        public List<EnergyData> GetEnergyDataHourly(string sourceId, DateTime from, DateTime to)
        {
            throw new NotImplementedException();
        }

        public List<EnergyData> GetEnergyDataWeekly(string sourceId, DateTime from, DateTime to, DayOfWeek firstDayOfWeek)
        {
            throw new NotImplementedException();
        }

        public List<EnergyData> GetEnergyDataMonthly(string sourceId, DateTime from, DateTime to)
        {
            throw new NotImplementedException();
        }

        public List<EnergyData> GetEnergyDataYearly(string sourceId, DateTime from, DateTime to)
        {
            throw new NotImplementedException();
        }

        public List<EnergyData> GetEnergyDataDaily(string sourceId, DateTime from, DateTime to)
        {
            throw new NotImplementedException();
        }

        #endregion

        
    }
}
